# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Fabian Bornschein <fabiscafe-cat-mailbox-dog-org>

pkgname=gnome-tour
pkgver=43.0
pkgrel=1
pkgdesc='Guided tour and greeter for GNOME'
arch=('loong64' 'x86_64')
url='https://gitlab.gnome.org/GNOME/gnome-tour'
license=('GPL3')
depends=('gtk4' 'libadwaita')
makedepends=('appstream-glib' 'meson' 'rust')
source=("https://download.gnome.org/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz")
sha256sums=('1351e419627fbd7c771932a6ef1ad80c0bf2e6828c4948a062068984ddb3cc88')

build() {
  arch-meson $pkgname-$pkgver build
  find -name Cargo.lock -exec rm -f {} \;
  mkdir -p .cargo
  cat > .cargo/config.toml <<EOF
[source.crates-io]
registry = "https://gitee.com/yetist/crates.io-index"
EOF
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}
